package com.cxd.performance.controller;

import com.cxd.performance.strategy.StrategyService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author long
 * @date 2022/11/30 15:12
 */
@RestController
@RequestMapping("/design")
public class DesignPatternController {

    @Resource
    private StrategyService strategyService;

    @GetMapping("/testStrategy")
    public String testStrategy(@RequestParam("type") String type) {
        strategyService.handleRequest(type);
        return "处理成功";
    }

}

